Class: GOBL::Bill::Payment

Inherits:
Object show all
Defined in:
lib/generated/gobl/bill/payment.rb

Overview

A Payment is used to link an invoice or invoices with a payment transaction.

Constant Summary collapse

SCHEMA_ID =

The Schema ID of the GOBL Payment structure

'https://gobl.org/draft-0/bill/payment'
TYPE_ENUM =

Enumeration of possible values for #type with their corresponding descriptions

{
  'request' => 'A payment request sent from the supplier to a customer indicating that they are
requesting a transfer of funds from the customer directly or a payer.
This is used to request payment for specific documents and invoices.',
  'advice' => 'A remittance advice sent from the customer to the supplier reflecting that payment for
the referenced documents has been made.',
  'receipt' => 'A payment receipt sent from the supplier to a customer indicating that they have
received a transfer of funds from the customer directly or a payer.
This is the default payment type and may be required by some tax
regimes in order to communicate the payment of specific documents and invoices.'
}.freeze

Instance Attribute Summary collapse

Method Summary

Methods inherited from Object

new

Methods inherited from Struct

#as_json, from_data, from_json!, #to_json

Instance Attribute Details

#$addons($addons) ⇒ Array<GOBL::CBC::Key> (readonly)

Addons defines a list of keys used to identify tax addons that apply special normalization, scenarios, and validation rules to a document.



49
# File 'lib/generated/gobl/bill/payment.rb', line 49

property :$addons, [GOBL::CBC::Key]

#$regime($regime) ⇒ GOBL::L10n::TaxCountryCode (readonly)



43
# File 'lib/generated/gobl/bill/payment.rb', line 43

property :$regime, GOBL::L10n::TaxCountryCode

#$tags($tags) ⇒ Array<GOBL::CBC::Key> (readonly)

Tags are used to help identify specific tax scenarios or requirements that may apply changes to the contents of the document or imply a specific meaning. Converters may use tags to help identify specific situations that do not have a specific extension, for example; self-billed or partial invoices may be identified by their respective tags.



54
# File 'lib/generated/gobl/bill/payment.rb', line 54

property :$tags, [GOBL::CBC::Key]

#codeGOBL::CBC::Code (readonly)

Code is a sequential identifier that uniquely identifies the payment. The code can be left empty initially, but is required to sign the document.



93
# File 'lib/generated/gobl/bill/payment.rb', line 93

property :code, GOBL::CBC::Code

#complementsArray<GOBL::Schema::Object> (readonly)

Additional complementary objects that add relevant information to the payment.



171
# File 'lib/generated/gobl/bill/payment.rb', line 171

property :complements, [GOBL::Schema::Object]

#currencyGOBL::Currency::Code (readonly)

Currency for all payment totals.



113
# File 'lib/generated/gobl/bill/payment.rb', line 113

property :currency, GOBL::Currency::Code

#customerGOBL::Org::Party (readonly)

Legal entity that receives the goods or services.



139
# File 'lib/generated/gobl/bill/payment.rb', line 139

property :customer, GOBL::Org::Party

#exchange_ratesArray<GOBL::Currency::ExchangeRate> (readonly)

Exchange rates to be used when converting the payment’s monetary values into other currencies.



118
# File 'lib/generated/gobl/bill/payment.rb', line 118

property :exchange_rates, [GOBL::Currency::ExchangeRate]

#extGOBL::Tax::Extensions (readonly)

Extensions for additional codes that may be required.



123
# File 'lib/generated/gobl/bill/payment.rb', line 123

property :ext, GOBL::Tax::Extensions

#issue_dateGOBL::Cal::Date (readonly)

When the payment was issued.



98
# File 'lib/generated/gobl/bill/payment.rb', line 98

property :issue_date, GOBL::Cal::Date

#issue_timeGOBL::Cal::Time (readonly)

IssueTime is an optional field that may be useful to indicate the time of day when the payment was issued.



103
# File 'lib/generated/gobl/bill/payment.rb', line 103

property :issue_time, GOBL::Cal::Time

#linesArray<PaymentLine> (readonly)

List of documents that are being paid for.



149
# File 'lib/generated/gobl/bill/payment.rb', line 149

property :lines, [PaymentLine]

#metaGOBL::CBC::Meta (readonly)

Additional semi-structured data that doesn’t fit into the body of the invoice.



176
# File 'lib/generated/gobl/bill/payment.rb', line 176

property :meta, GOBL::CBC::Meta

#methodGOBL::Pay::Instructions (readonly)

Details on how the payment was made based on the original instructions.



83
# File 'lib/generated/gobl/bill/payment.rb', line 83

property :method, GOBL::Pay::Instructions

#notesArray<GOBL::Org::Note> (readonly)

Unstructured information that is relevant to the payment, such as correction or additional legal details.



166
# File 'lib/generated/gobl/bill/payment.rb', line 166

property :notes, [GOBL::Org::Note]

#orderingGOBL::Bill::Ordering (readonly)

Ordering allows for additional information about the ordering process including references to other documents and alternative parties involved in the order-to-delivery process.



155
# File 'lib/generated/gobl/bill/payment.rb', line 155

property :ordering, GOBL::Bill::Ordering

#payeeGOBL::Org::Party (readonly)

Legal entity that receives the payment if not the supplier.



144
# File 'lib/generated/gobl/bill/payment.rb', line 144

property :payee, GOBL::Org::Party

#precedingArray<GOBL::Org::DocumentRef> (readonly)

Key information regarding previous versions of this document.



128
# File 'lib/generated/gobl/bill/payment.rb', line 128

property :preceding, [GOBL::Org::DocumentRef]

#seriesGOBL::CBC::Code (readonly)

Series is used to identify groups of payments by date, business area, project, type, customer, a combination of any, or other company specific data. If the output format does not support the series as a separate field, it will be prepended to the code for presentation with a dash (‘-`) for separation.



88
# File 'lib/generated/gobl/bill/payment.rb', line 88

property :series, GOBL::CBC::Code

#supplierGOBL::Org::Party (readonly)

The taxable entity who is responsible for supplying goods or services.



133
# File 'lib/generated/gobl/bill/payment.rb', line 133

property :supplier, GOBL::Org::Party

#totalGOBL::Num::Amount (readonly)

Total amount to be paid in this payment, either positive or negative according to the line types and totals. Calculated automatically.



160
# File 'lib/generated/gobl/bill/payment.rb', line 160

property :total, GOBL::Num::Amount

#typeGOBL::CBC::Key (readonly)

Type of payment document being issued.



77
# File 'lib/generated/gobl/bill/payment.rb', line 77

property :type, GOBL::CBC::Key

#uuidString (readonly)

Universally Unique Identifier.



59
# File 'lib/generated/gobl/bill/payment.rb', line 59

property :uuid, String

#value_dateGOBL::Cal::Date (readonly)

When the taxes of this payment become accountable, if none set, the issue date is assumed.



108
# File 'lib/generated/gobl/bill/payment.rb', line 108

property :value_date, GOBL::Cal::Date